package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.smartfactory.sail.entity.enums.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 合同表
 * </p>
 *
 * @author 王巨壁
 * @since 2019-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Contract对象", description="合同表")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "合同批号")
    @TableField("contractCode")
    private String contractCode;

    @ApiModelProperty(value = "客户id")
    @TableField("custId")
    private Long custId;

    @ApiModelProperty(value = "客户名称-客户名称会变动合同中只记录当前名称")
    @TableField("custName")
    private String custName;

    @ApiModelProperty(value = "联系人名称")
    @TableField("contactsName")
    private String contactsName;

    @ApiModelProperty(value = "联系方式")
    @TableField("contactInformation")
    private String contactInformation;

    @ApiModelProperty(value = "企业地址")
    @TableField("custAddr")
    private String custAddr;

    @ApiModelProperty(value = "纳税人识别号")
    @TableField("taxpayerIdentityNum")
    private String taxpayerIdentityNum;

    @ApiModelProperty(value = "开户行")
    @TableField("openBank")
    private String openBank;

    @ApiModelProperty(value = "开户账号")
    @TableField("openAcctno")
    private String openAcctno;

    @ApiModelProperty(value = "企业地址")
    @TableField("companyAddress")
    private String companyAddress;

    @ApiModelProperty(value = "合同金额单位:元")
    @TableField("contractAmount")
    private Double contractAmount;

    @ApiModelProperty(value = "付款方式:1现金2全款3分期")
    @TableField("payType")
    private ContractPaytypeEnum payType;

    @ApiModelProperty(value = "合同类型1普通2加急")
    @TableField("contractType")
    private ContractTypeEnum contractType;

    @ApiModelProperty(value = "订单类型1生产2修磨3混合")
    @TableField("orderType")
    private OrderModelEnum orderType;

    @ApiModelProperty(value = "付款时间节点可能是多个时间用逗号隔开")
    @TableField("deliveryTimeNode")
    private String deliveryTimeNode;

    @ApiModelProperty(value = "签单人id")
    @TableField("signerId")
    private Long signerId;

    @ApiModelProperty(value = "合同图片多个用逗号隔开")
    @TableField("contractImgs")
    private String contractImgs;

    @ApiModelProperty(value = "合同状态1初始状态2生产中3已发货4催款中5已完成")
    private ContractStatusEnum status;

    @ApiModelProperty(value = "交货日期")
    @TableField("deliveryDate")
    private String deliveryDate;

    @ApiModelProperty(value = "开票状态1未开票2已开票")
    @TableField("InvoiceStatus")
    private ContractInvoiceStatusEnum InvoiceStatus;

    @ApiModelProperty(value = "创建人")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    private String createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updateUser")
    private String updateUser;

    @ApiModelProperty(value = "更新时间yyyy-MM-dd HH:mm:ss")
    @TableField("updateTime")
    private String updateTime;


}
